package com.lhd.creational.singleton.demo04;

/**
 * @Author: liuhd
 * @Date: 2024/10/19 17:06
 * @Description:
 */
public class Singleton {
    private static Singleton singleton;
    private Singleton(){}
    private static synchronized Singleton getInstance(){
        if (singleton == null){
            singleton = new Singleton();
        }
        return singleton;
    }
}

